<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%>
<%@ taglib prefix="x_rt" uri="http://java.sun.com/jstl/xml_rt"%>
<%@ taglib prefix="wr_fn" uri="http://njo.org/taglib/functions"%>
<div class="menuheader">
  <a title="Njo Software 首页" href="${pageContext.request.contextPath}/index.tiles">Home</a>
</div>
<menu compact="true">
</menu>
<!-- 登录之后，需要隐藏或者变成退出登录 -->
<c:choose>
  <c:when test="${remoteUser==null}">
    <div class="menuheader">
      <a title="登录网站" href="${pageContext.request.contextPath}/login.tiles">Login</a>
    </div>
    <menu compact="true">
    </menu>
  </c:when>
  <c:otherwise>
    <div class="menuheader">
      <a title="退出登录" href="${pageContext.request.contextPath}/processor.logout.tiles">Logout</a>
    </div>
    <menu compact="true">
    </menu>
  </c:otherwise>
</c:choose>

<div class="menuheader"><a name="news" title="新闻">News</a></div>
<menu compact="true">
  <li><a title="" href="${pageContext.request.contextPath}/building.tiles">网站开张了</a></li>
  <li><a title="" href="${pageContext.request.contextPath}/building.tiles">今天天气不错</a></li>
</menu>




<div class="menuheader"><a name="forum" title="论坛">Forum</a></div>
<menu compact="true">
<c:forEach items="${furumboards}" var="item" varStatus="itemStatus">
  <c:forEach items="${item.boards}" var="subItem" varStatus="subItemStatus">
    <li><a title="${subItem.description}" href="${pageContext.request.contextPath}/processor.listsubject.tiles?board=${subItem.id}">${subItem.title}</a></li>
  </c:forEach>
</c:forEach>
</menu>

<div class="menuheader"><a name="article">Article</a></div>
<menu compact="true">
  <li><a title="" href="${pageContext.request.contextPath}/building.tiles">配置服务器</a></li>
</menu>

<div class="menuheader">Search njo.org</div>
<form action="${pageContext.request.contextPath}/building.tiles" method="post">
  <p><input size="10" name="query"/>
  <input type="submit" value="go"/></p>
</form>